/* 
 * Copyright 2010 HIT-CIR (HIT Center for Information Retrieval). 
 * 
 * author: chuter
 * mail:   lliu@ir.hit.edu.cn, topgun.chuter@gmail.com
 */
package edu.hit.irlab.coref.mentionfinder;

/**
 * Just take the last token of the <code>Mention</code> as
 * the head
 * @author chuter
 *
 */
public class DefaultNpHeadFinder implements NpHeadFinder {

	public int[] findNpHead(Mention mention) {
		if (mention.getMentionType().equals(MentionFinder.PER)) {
			return new int[] {
					mention.getExtentBegintokenId(),
					mention.getExtentEndtokenId()
				};
		} else {
		return new int[] {
				mention.getExtentEndtokenId(),
				mention.getExtentEndtokenId()
			};
		}
	}
	
}
